<!DOCTYPE HTML>

<html>
<head>



<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">

<title>iReport</title>
<link rel="stylesheet" href="css/stylemaster.css" type="text/css" media="screen" title="no title" charset="utf-8">


<!-- jQuery Mobile Includes -->
<link rel="stylesheet" href="jq/jquery.mobile-1.0.css" />
<script src="jq/jquery.js"></script>
<script src="jq/jquery.mobile-1.3.js"></script>

<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8" src="js/iReport.js"></script>
<script type="text/javascript" charset="utf-8" src="js/begin.js"></script>
<script type="text/javascript" charset="utf-8" src="js/forward.js"></script>
<script type="text/javascript" charset="utf-8" src="js/equip.js"></script>
<script type="text/javascript" charset="utf-8" src="js/sync.js"></script>
<script type="text/javascript" charset="utf-8" src="js/photo.js"></script>

<script>
$(document).on('mobileinit', function () {
    $.mobile.ignoreContentEnabled = false;
});
</script>

<style> 



/* Rotate the Signature Buttons */



input.rot
{
display:block;
background-color:white;
/* Rotate div */

 -webkit-transform:rotate(90deg); 
 /* Safari and Chrome */
}

/* Not Used 
img.rot 
{
background-color:white;
/* Rotate div */
position:relative; left:50px;  
 -webkit-transform:rotate(-90deg); 
 /* Safari and Chrome */
}
*/

</style>


<!--  HighCharts Includes  -->
<script src="js/highcharts/js/highcharts.js"></script>


<!-- Signature Capture files -->
<script type="text/javascript" src="js/mousecanvas.js"></script>
<script type="text/javascript" src="js/touchcanvas.js"></script>




<!--Graphing Functions  -->
<script src="js/myGraphCallback.js"></script>


<script type="text/javascript" charset="utf-8">
     
	     
		
   //Global Vars
     var daIndex = 0;

     
     // Wait for PhoneGap to load
    // The err condition allows you to run this on Chrome with web security disabled:  chrome.exe --disable-web-security
   

function onLoad() {
	
		try {	
	    onDeviceReady();
		//document.addEventListener("deviceready", onDeviceReady, false);
		}
		catch (err){
		onDeviceReady();
		}
	
	}
	
	
	
    function onDeviceReady() {
	
	try{
      	pictureSource=navigator.camera.PictureSourceType;
	    destinationType=navigator.camera.DestinationType;
		//ios 7 change height
		if (parseFloat(window.device.version) > 7.0) {
          document.body.style.marginTop = "20px";
		}
		
		
		
		
    }  
     catch(err) {
	 //alert("chrome");
	 }
	 
        //Globals
		
	var backupURL
		
	//var backupURL = "http://www.chardonlabs.com/R2D2.nsf/prereport?createdocument";
	
	//var backupURL = "http://www.chardonlabs.com/eReportv4.nsf/iPhone?createdocument";
		
		localStorage.setItem('backupURL', 'http://www.chardonlabs.com/R2D2.nsf/prereport?createdocument' );
		localStorage.setItem('backupURL', 'http://www.chardonlabs.com/eReportv4.nsf/iPhone?createdocument' );
			
			
			var daIndex = 0;
		 	 initWEBDB(); //iReport.js
		 	 hide("daJCPText");
		//Check for blank Tech, if so then go to setup.html
		setupUser();	//initDB.js	
		
		
		//populate the Shrinking List
		//loadSL();  //iReport.js
		localStorage.setItem('listType', 'shrinkingList' ); // init the List Type
		 	 

  
	
	
	// Add this behavior to all text fields
   
	
    	 
	 //Get the Tech name from LocalStorage
   	 document.getElementById('TechName').innerHTML = localStorage.getItem("tech");
	 document.getElementById('TechName2').innerHTML = localStorage.getItem("tech");
     //document.getElementById('TechName3').innerHTML = localStorage.getItem("tech");
	 document.getElementById('TechName4').innerHTML = localStorage.getItem("tech");
	
	//Get the Template List Type from localStorage
	var listType = localStorage.getItem('listType');
//alert("listType stored is: " + listType);

	
//Load Templates based on listType
	
//alert("customer_templates " + customer_templates.value);
	
  	if (listType =='shrinkingList'){
  	//loadData('ShrinkingList');
	loadSL(); //loadTemplates.js
	$('#Client').val("Shrinking List");
	
  	//document.getElementById('Client').innerHTML = "Shrinking List";
  	}
  		if (listType =='bookView'){
  	//	loadData('BookView');
	loadBV(); //loadTemplates.js
  		document.getElementById('Client').innerHTML = "Book View";
  	}
  		if (listType =='onDevice'){
  	//	loadData('Reports');
	loadOD(); //loadTemplates.js
  		document.getElementById('Client').innerHTML = "On Device";
  	}
  	
	checkEmptyCustomer(); //Preload customer templates field with choices
	
  	//initialize the StopWatch
  	//display();

  	
  //Check network status
   
         //navigator.network.isReachable("www.chardonlabs.com", reachableCallback, {});
     	 
    }
    
 //Network Reachable ?
		function reachableCallback(reachability) {
        // There is no consistency on the format of reachability
        var networkState = reachability.code || reachability;

        var states = {};
        states[NetworkStatus.NOT_REACHABLE]                      = 'Offline';
        states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Cell';
        states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK]         = 'WiFi';

		document.getElementById('onlineStatus').innerHTML = states[networkState];

        //alert('Connection type: ' + states[networkState]);
    }
    
    
	
	
	 function checkEmptyCustomer() {
	 
	 
	 
	 
	 
	//checks the customer template dropdown - if its empty try the BookView
			var zz = document.getElementById('customer_templates').innerHTML;
			var xx = '<option value =""></option>';
			
			if (zz=xx){
			//alert("customers are blank");
			
			document.getElementById('customer_templates').innerHTML = '<option value =""></option>';
			
			localStorage.setItem('listType', 'bookView' ); // init the List Type
			
			loadBV(); //loadTemplates.js
	      }
	}
	
	
  ///////////////////////////////////////////////////////////
 //VERSION
 ///////////////////////////////////////////////
      
	  var Version = localStorage.setItem('Version', 'iPhone 10-19-13');
    
    
    
    //Business / Navigation Logic
    
    //Step 1 - Pick you Customer and Start the eReport
    
    function startReport(){
    
    var daCustID = document.getElementById("customer_templates").value;
	
	
	if (daCustID ==""){
	alert("Please choose a Customer.");
	return;
	}
	
    localStorage.setItem("custid", daCustID);
    var daCustID2 = localStorage.getItem("custid");
    
    var ListType = localStorage.getItem("listType");
    
	console.log(ListType + " index.html 183");

  //Save Type of Report so you can remove from Shrinking List or Not Remove from BV
       
    if (ListType != "onDevice"){
    saveReport (daCustID2, "listType", ListType);

    }
    
        
		// Original begin code
        begin(); //begin.js
		
			
        //Start Time is set in begin.js on non-draft reports
       	window.today.click();
				
		var d = new Date();
		var curr_date = d.getDate();
		var curr_month = d.getMonth();
		curr_month++;
		var curr_year = d.getFullYear();
		daDate =   curr_month  + '/' + curr_date  + '/' + curr_year;
		document.forms[0].ReportDate.value = daDate;
		
		//alert(daDate);
		//End Date Population
		
    	hide("ChooseCustomer");
    	//hide("preview");
    	//hide("Begin");
    	
    	hide ("signature");
    	show("Makeup");
	
		hide("simple");
        }
	//Step 2 - Get the Makeup Values

	
	//Step 3 - Load the Equipment Arrays

	
	
    
    var mapURL = null;
   
   
   
   var d=new Date();
var month=new Array(21);

month[-9]="April '11";
month[-8]="May '11";
month[-7]="June '11";
month[-6]="July '11";
month[-5]="August '11";
month[-4]="Sept '11";
month[-3]="Oct '11";

month[-2]="Nov '11";
month[-1]="Dec '11";
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
   
   //alert(month[d.getMonth()-3]);
 //Insert  Month Name as Button Labels in Historical
 var month1 = month[d.getMonth()-1];
 var month2 = month[d.getMonth()-2];
 var month3 = month[d.getMonth()-3];
 var month4 = month[d.getMonth()-4];
 var month5 = month[d.getMonth()-5];
 var month6 = month[d.getMonth()-6];
 var month7 = month[d.getMonth()-7];
 var month8 = month[d.getMonth()-8];
 var month9 = month[d.getMonth()-9];
  
 
 localStorage.setItem("month1",month1); 
 localStorage.setItem("month2",month2);
 localStorage.setItem("month3",month3);
 localStorage.setItem("month4",month4);
 localStorage.setItem("month5",month5);
 localStorage.setItem("month6",month6);
 localStorage.setItem("month7",month7);
 localStorage.setItem("month8",month8);
 localStorage.setItem("month9",month9);
 
//Signature Functions
 
function resetCanvas(){

		canvas = document.getElementById("simple");
        // set the canvas height to the window height and width
        //canvas.width = window.innerWidth -50 ;
        //canvas.height = window.innerHeight -150;
        // get a reference to our drawing context
        context = canvas.getContext("2d");

		canvas.width = 539;
        canvas.height = 234;
		
		canvas2 = document.getElementById("simple2");
        // set the canvas height to the window height and width
        //canvas.width = window.innerWidth -50 ;
        //canvas.height = window.innerHeight -150;
        // get a reference to our drawing context
        context = canvas2.getContext("2d");

		canvas2.width = 350;
        canvas2.height = 550;
		
		show("container");
		hide("signatureimage");
}

function reDraw(){
			//alert("reDraw");
				var ctx = document.getElementById('simple').getContext('2d');  
			    var img=document.getElementById("signatureimage");
				 ctx.translate(275, 120);
                  ctx.rotate(-90 * Math.PI / 90);
				  ctx.drawImage(img,0,0);
			 
	}


	function showImage()
		{
			var canvas  = document.getElementById("simple");
			var ImgData = canvas.toDataURL();
			//alert("ImgData " + ImgData);

			  var myImage = canvas.toDataURL("image/png");      // Get the data as an image.
			  var imageElement = document.getElementById("signatureimage");  // Get the img object.
			  imageElement.src = myImage;                           // Set the src to data from the canvas.
			
				hide("container");
				show("signatureimage");
					//save the signature data
			custid3 =  localStorage.getItem("custid");
			saveReport (custid3, "container", ImgData);
			

	
		}

	
	function showImageFlipped()
	{
		//I use 2Canvas and 2 Image Tags 10-19-13
		
			var canvas  = document.getElementById("simple");
			var context = canvas.getContext('2d');
		    var myImage = canvas.toDataURL("image/png");      // Get the data as an image.
		    var imageElement = document.getElementById("signatureimage");  // Get the img object.
			imageElement.src = myImage;      			// Set the src to data from the canvas.
		//in the image tag there is an onload function that will call flip it
		}
		
		function flipIT(){
		//alert('flipIT');
		//alert(document.getElementById("signatureimage").complete);
		myImage='';//free up memory
		var image = document.getElementById("signatureimage");
		var canvas2 = document.getElementById('simple2');
		var canvas2Context = canvas2.getContext('2d');
		canvas2Context.drawImage(image, 10, 10);
		canvas2.setAttribute('width', image.height);
		canvas2.setAttribute('height', image.width);
		canvas2Context.rotate(270 * Math.PI / 180);
		canvas2Context.drawImage(image, -image.width, 0);
		canvas2Context.save();
	
		var ImgData2 = canvas2.toDataURL();
		
		 var imageElement2 = document.getElementById("signatureimage2");  // Get the img object.
		 imageElement2.src = ImgData2;		
		
	//alert('sideways img length: '+ imageElement2.src.length);
		//save the Signature to the 1st Canvas and image container
		 hide("container");
		 hide("signatureimage");
        show("signatureimage2");
  
  //save the Rotated signature data
		custid3 =  localStorage.getItem("custid");
		saveReport (custid3, "container", imageElement2.src); //Save the Rotated Data
  
  
	}//End ShowImage
	
	function showImageOLD()
	{
		//I use 2 Canvas and 2 Image Tags 10-19-13
		
			var canvas  = document.getElementById("simple");
			var context = canvas.getContext('2d');
			var ImgData = canvas.toDataURL();
			//alert(ImgData);
		    var myImage = canvas.toDataURL("image/png");      // Get the data as an image.
		    var imageElement = document.getElementById("signatureimage");  // Get the img object.
			imageElement.src = myImage;      			// Set the src to data from the canvas.
		alert(document.getElementById("signatureimage").complete);
		
		//save the Signature to the 1st Canvas and image container
				
	
		var image = document.getElementById("signatureimage");
		var canvas2 = document.getElementById('simple2');
		var canvas2Context = canvas2.getContext('2d');
		canvas2Context.drawImage(image, 10, 10);
		//canvas2Context.save();
		

		//alert("image dimensions:"+ image.height+"x"+image.width);
		//Get the Temp Canvas with the rotated Signature
	
	

		canvas2.setAttribute('width', image.height);
		canvas2.setAttribute('height', image.width);
		canvas2Context.rotate(270 * Math.PI / 180);
		canvas2Context.drawImage(image, -image.width, 0);
		//canvas2Context.save();
	
		var ImgData2 = canvas2.toDataURL();
		var t=setTimeout(function(){console.log("saving Sig img")},1000)
		
		if (ImgData2.length < 1000){
		alert(ImgData2.length);
		alert(ImgData2);
		ImgData2 = canvas2.toDataURL();
		alert(ImgData2.length);
		
		}
		

		  var myImage2 = ImgData2;      // Get the data as an image.
		  var imageElement2 = document.getElementById("signatureimage2");  // Get the img object.
	
		   imageElement2.src = canvas2.toDataURL("image/png");
		   var t=setTimeout(function(){console.log("saving Sig img")},1000)
	
		  hide("container");
		 hide("signatureimage");
		 
		  console.log('image2 length is:' + imageElement2.src.length);
		 if(imageElement2.src.length > 100){
		  show("signatureimage2");
		 
		  } 
		  
		 if(imageElement2.src.length < 100){
		  alert('Reprocessing image, length is:' + imageElement2.src.length);
		  		  imageElement2.src = canvas2.toDataURL("image/png");
		  var t=setTimeout(show("signatureimage2"),2000);
		  } 
		
		
		//save the Rotated signature data
		custid3 =  localStorage.getItem("custid");
		saveReport (custid3, "container", imageElement2.src); //Save the Rotated Data
			
			  
  
	}//End ShowImage

	
		

    


</script>
<script type="text/javascript">
function rotate(p_deg)
{

var image = document.getElementById('signatureimage');
var canvas = document.getElementById('simple');
var canvasContext = canvas.getContext('2d');
alert('after get context');
canvasContext.drawImage(image, 10, 10);


 switch(p_deg) {
     default :
     case 0 :
  canvas.setAttribute('width', image.width);
  canvas.setAttribute('height', image.height);
  canvasContext.rotate(p_deg * Math.PI / 180);
  canvasContext.drawImage(image, 0, 0);
  break;
     case 90 :
  canvas.setAttribute('width', image.height);
  canvas.setAttribute('height', image.width);
  canvasContext.rotate(p_deg * Math.PI / 180);
  canvasContext.drawImage(image, 0, -image.height);
  break;
     case 180 :
  canvas.setAttribute('width', image.width);
  canvas.setAttribute('height', image.height);
  canvasContext.rotate(p_deg * Math.PI / 180);
  canvasContext.drawImage(image, -image.width, -image.height);
  break;
     case 270 :
     case -90 :
  canvas.setAttribute('width', image.height);
  canvas.setAttribute('height', image.width);
  canvasContext.rotate(p_deg * Math.PI / 180);
  canvasContext.drawImage(image, -image.width, 0);
  break;
 };
}
</script>





</head>
<body onload="onLoad();"  id="stage" class="theme">
<form>


<div data-role="page" id="ChooseCustomer">


  
   <div data-role="header" data-position="fixed" data-id="toolbar1" data-fullscreen="true">
   
	 <div data-role="navbar" class="ui-state-persist">
      <ul>
        <li><a class="ui-btn-active"  href="#" data-icon="grid" onClick="localStorage.setItem('listType', 'shrinkingList' );loadSL(); $('customer_templates').selectmenu('refresh', true);"  id="daSLCnt" data-theme="b" >Shrink List <text id="SLCnt"></text></a></li>
	    <li><a href="#" data-icon="grid" onClick="localStorage.setItem('listType', 'bookView' );loadBV(); $('customer_templates').selectmenu('refresh', true); " id="daBVCnt" data-theme="b"  >Book View <text id="BVCnt"></text></a></li>
		<li><a href="#" data-icon="grid" onClick="localStorage.setItem('listType', 'onDevice' );loadOD(); $('customer_templates').selectmenu('refresh', true); "  id="GetOD" data-theme="b"  >On Device <text id="CompCnt"></text></a></li>
	    </ul>
    </div>
  </div>
  
    </br>
  
  	<p align='right' style="display:none" >Logged in as: <text id='TechName'></text></p>
	
  <center><h1>Chardon Labs</h1></center>
  
  <a href="#" data-role="button" data-iconpos="top" data-theme="c" onclick="hide('preview'); startReport(); "><center><img src="img/logo.png" alt="Chardon Logo" height="35px" width="30px" ></center><h1>Start iReport</h1></br></a>
  


  
 

<table border="0" cellspacing="0" cellpadding="0" width="100%">
		<tr valign="top">
		<td width="100%" colspan="3"><font size="2" face="Arial">
		<hr>
		<center><h1 id="Client"></h1><center>

		</font></td>
	</tr>

</table>

<center>
<h1>Choose Customer:</h1>

<select  data-role="none" name="customer_templates"	id="customer_templates" onChange="preview(); localStorage.setItem('custid', this.value);localStorage.setItem('customerName', this.options[this.selectedIndex].text); myGraphCallback(0);">
</select> 


<span id ="GraphImage">
 <img src="img/graph.jpg"  alt="Graph" height="30px" width="30px" onclick="hide('preview'); hide('ChooseCustomer'); show('Graph');begin();"> 
</span>

<div id="preview" style="display: none"><text id='dspCust'></text><br>



</p>
<text id='BillAddress'></text><br>
<text id='emailNotify'></text><br>
<text id='CSZ'></text>
</p>
<div id='map'></div>

</div>
</center>

		



	<div data-role="footer" data-position="fixed" data-id="toolbar" data-fullscreen="true">  
    <div data-role="navbar">
      <ul>
        <li><a href="#" data-icon="arrow-d" data-transition="fade" data-ajax="true" onclick="alert('Connecting to Server ....'); login(); getBVTemplates(); getSLTemplates(); getHistory(); " >Get Templates</a></li>
        <li><a href="#" onclick="login(); syncData2();" data-icon="refresh" data-transition="fade">Sync</a></li>

		     <li><a href="options.html" data-icon="gear" data-transition="fade">Setup</a></li>
      </ul>
    </div>
  </div> 


</div>

<!--///////////////////////////////////////   GRAPH  ///////////////////////////////// -->
<div id ="Graph"  style="display:none" >
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
				<tr>
					<td>
						<img src="img/Larrow.png" onClick="show('preview'); show('ChooseCustomer'); hide('Graph');" >
					</td>

					<td width="140" ><h4>Customer</h4></td>
					<td>
						<img src="img/Rarrow.png" onClick="hide('preview'); hide('Graph'); startReport();" > 
					</td>
				</tr>
			</table>

	<div id="containerGraph" style="width: 00px; height: 400px"></div>
	
	<center>
		Equipment<select name = "GraphEquipListHist" id="GraphEquipListHist" onchange="myGraphCallback(this.options[this.selectedIndex].value);//loadChartDropDowns();"><select>
		
		<!-- Reading<select name = "GraphEquipTestHist" id="GraphEquipTestHist" onchange="alert(this.options[this.selectedIndex].value); myGraphCallback(this.options[this.selectedIndex].value);">   <select>-->
	</center>
	
	<span style='display:none'>
		Equip<select name="equipGraph" id="equipGraph" onChange="makeGraph();"></select>
		Reading<select name="readingGraph" id="readingGraph" onChange="makeGraph();"></select>
		
		Equipment Test<select name = "PDAEquipTestHist" id="PDAEquipTestHist" ><select>
		Range<select name = "PDAEquipRangeHist" id="PDAEquipRangeHist" ><select>
		
		History<select name = "pdaDataCollectionHist" id="pdaDataCollectionHist" ><select>
	</span>
	
	
</div>








<!--////////////////////////////////////////MAKEUP///////////////////////////////// -->
<div id="Makeup" style="display: none;">

<table class="MUTop" border="0" cellspacing="0" cellpadding="0"
	width="100%">
	<tr>
		<td colspan="1" align="left"><a href="index.html" onClick="hide('Makeup');show('ChooseCustomer');"><img
			src="img/Larrow.png" ></a></td>
		<font size="3" face="Arial">
		<td>
		<center>
		<h2><text id='Client2'></text></h2>
		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png" onClick="go();"></td>
	</tr>
	<tr valign="top">
		<td width="100%" colspan="3"><font size="2" face="Verdana">

		<hr>
		<p align='right' style="display:none">Logged in as: <text id='TechName2'></text></p>
		</font></td>
	</tr>
</table>



<table style="font-size: 20px; font-weight: bold;">
	<tr valign="top">
		<td width="96">Mileage</td>
		<td width="180" colspan="2"><font size="4" face="Arial">
		<input id="mileage"	autocomplete="off" size="10" type="tel" name="mileage" value="" tabindex="1"	onkeyup="var custid = document.getElementById(&quot;customer_templates&quot;).value;
			saveReport (custid, this.id, this.value);"
			></font></td>
		<td width="4" style="font-size: 15px;">
		<!-- <a href="#" onClick="ClearOptions('histList');">History</a> -->
		History
		</td>
	</tr>
	<tr valign="top">
		<td width="96"><a
			onclick="var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear();
daDate =   curr_month  + '/' + curr_date  + '/' + curr_year;
document.forms[0].ReportDate.value = daDate;"
			style='text-decoration: underline'>Report Date</a></td>
		<td width="221" colspan="2"><font size="6" face="Arial"> <input
			name="ReportDate" value="12/14/2010" size=10
			onblur="var custid = document.getElementById(&quot;customer_templates&quot;).value;
saveReport (custid, this.id, this.value);"
			id="ReportDate"></font><b><font size="6" face="Arial"> </font></b> </td>
		<td width="125">
				<select name="histList" id="histList" onChange="populateMakeup(this.value)"></select>
		
			</td>
	</tr>

	<font size="6" face="Arial">

	<tr valign="top">
		<td width="96">Conductivity</td>
		<td width="100" colspan="2"><input type="tel" name="Conductivity" id="Conductivity" value="" size="10"  autocomplete="off" 	onkeyup="var custid = document.getElementById(&quot;customer_templates&quot;).value; saveReport (custid, this.id, this.value);"></td>
		<td width="125">
				<input type="tel" name="Conductivity2" id ="Conductivity2" readonly="true"  value="" size="4"  autocomplete="off">
		</td>
	</tr>

	<tr valign="top">
		<td width="96">Hardness</td>
		<td width="100" colspan="2"><input type="tel" id="calciumHardness" name="calciumHardness" value="" size="10"  autocomplete="off"
			onkeyup="var custid = document.getElementById(&quot;customer_templates&quot;).value; saveReport (custid, this.id, this.value);"></td>
		<td width="125">
		
		<input type="tel" name="calciumHardness2" id ="calciumHardness2" readonly="true"  value="" size="4"  autocomplete="off">
		
		</td>
	</tr>

	<tr valign="top">
		<td width="96">Alkalinity</td>
		<td width="100" colspan="2"><input type="tel" name="alkalinity"  id="alkalinity" value="" size="10"  autocomplete="off"	onkeyup="var custid = document.getElementById(&quot;customer_templates&quot;).value;
saveReport (custid, this.id, this.value);"
			></td>
		<td width="125">
		<input type="tel" name="alkalinity2" id ="alkalinity2" readonly="true"  value="" size="4"  autocomplete="off">
			
			</td>
	</tr>

	<tr valign="top">
		<td width="96">Chlorides</td>
		<td width="100" colspan="2"><input type="tel" name="chlorides" id="chlorides"	value="" size="10"  autocomplete="off" onkeyup="var custid = document.getElementById(&quot;customer_templates&quot;).value;
saveReport (custid, this.id, this.value);"
			></td>
			
		<td width="125">
		<input type="tel" name="chlorides2" id ="chlorides2" readonly="true"  value="" size=4  autocomplete="off">
		</td>
	</tr>
	</font>
</table>
<input name="nextfield" value="0"		style="display: none"> 
</p>
<hr>
</p>
<table class="MUTop" border="0" cellspacing="0" cellpadding="0"
	width="100%">
	<tr>
		<td colspan="1" align="left">
		
		<a href="index.html" onClick="hide('Makeup');show('ChooseCustomer');"><img
			src="img/Larrow.png" ></a>
		</td>
		<font size="3" face="Arial">
		<td>
		<center>
		<h2><text id='Client2'></text></h2>
		</center>
		</td>
		<td colspan="1" align="right"><img   src="img/Rarrow.png"
			 onClick="$('EquipList').selectmenu('refresh', true); go();"></td>
	</tr>
	<tr valign="top">
		<td width="100%" colspan="3"><font size="2" face="Verdana">


		<p align='right'></p>
		</font></td>
	</tr>
</table>






</div>

<!--////////////////////////////////////////Equipment///////////////////////////////// -->

<div id="equip" style="display: none">

<table border="0" cellspacing="0" cellpadding="0" width="100%" >
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('equip'); show('Makeup');" ></td>
		<td>
		<center>
		<h3><text class="daClient" id='Client3'></text></h3>
		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="forward333(); hide('equip'); show('CameraSection');" ></td>
	</tr>
	<tr valign="top">
		<td colspan="1" align='left'><font size="2" face="Verdana">
		<img src="img/resetCalcs.png" onClick="resetCalcs();" >
		</td>
		<td colspan="1" align='left'><font size="2" face="Verdana">
		
			<img src="img/calc.png" onClick="doCalcs();" >
			</td>
			<td colspan="1">
			
		<p stype='display:none' align='right'><text id='TechName3'></text></p>
		</font></td>
	</tr>
</table>

<h1 style="display: none">Equipment</h1>
<center>
<select class="" name="EquipList" id="EquipList"	onchange="go(); ">

</select><br>
</center>

<!-- go(); forward333(); go();  Start Go Button --> <input style="display: none" type="button"
	value="GO!" onclick="go(); ">



<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td>
		<img src="img/Blue_Left.png" onClick="backward();" >
		</td>

		<td width="140" ><h4 id="testname"></h4></td>


		<td>
		<img src="img/Blue_Right.png" onClick="forward333();" >
		</td>
	</tr>


</table>



<table border="0" cellspacing="0" cellpadding="0">
    

    <tr >
        <td width="25%"></td>
        <td width="25%" valign="top" > <input name="RangeName"    value="" size=10 id="RangeName"   autocomplete="off" ></td>
        
        <td width="60%" valign="bottom" >
<input name="daData" value="" type="number" size=10 id="daData"  autocomplete="off" onkeyup="SaveDaData();" >
<font size="5" ><input name="daJCPText" value="daJCPText" type="text" size=10 id="daJCPText"  autocomplete="off" ></font>
        </td>

        
    </tr>
    </table>

<table border="0" cellspacing="0" cellpadding="0" width="95%">
	<tr valign="top">
	<td  colspan="2">
		<td></td>
		<td ></td>
	</tr>

	<tr valign="top">
		<td width="96"></td>
		<td width="96"></td>
		<td width="120"></td>
		<td width="104"><select name="EquipHistList" id="EquipHistList" onChange="populateReadings(this.value)"></select></td>
	</tr>

	<tr valign="top">
	
	
		<td><textarea id="PDAEquipTest" rows="35" style="width:100%; height:100%;" ></textarea></td>
		<td><textarea id="PDAEquipRange" rows="35" style="width:100%; height:100%;" ></textarea></td>
		<td><textarea id="pdaDataCollection" rows="35" style="width:100%; height:100%;"> </textarea></td>
		<td><textarea id="pdaDataHist" rows="35" style="width:100%; height:100%;" ></textarea></td>
	</tr>
</table>
<i><font face="Arial">
</p>
<hr>
</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('equip'); show('Makeup');" "></td>
		<td>
		<center></center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="forward333(); hide('equip'); show('CameraSection');" ></td>
	</tr>
</table></div>



 <div height="600" width="600" id="container"  style="display: none"  ontouchmove="event.preventDefault();" >
			  <canvas id="simple" height="235" width="540" style="border-width: 2px; border-style: dashed; border-color: grey;"></canvas>
				  	
					<input type="button" id="sigDone" value="Done" onClick="show('comments'); showImage();"/>
					<input type="button" id="sigReset" value="Reset" onClick="resetCanvas(); show('simple'); hide('signatureimage');"/>
</div>
		

					  
		

				
			
 
				
<div id="comments" style="display: none">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('comments'); show('actions');" ></td>
		<td>
		<center>
		<h3>Service </h3>
		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="hide('comments'); show('SaveIT');" ></td>
	</tr>
	<tr>
	<td colspan="1" align="left"><img src = "img/getSig.png"  onClick="show('container'); show('simple');hide('comments');"  ></td>
		<td><center><h3>Summary</h3></center></td>
		<td colspan="1" align="right"><img src = "img/exCheckedno.png"  name="except"  onclick="toggleException();"/></td>
	
	</tr>
	
	
	
</table>





 <!-- Image for the Signature -->
	<img id="signatureimage"  style="display: none" onload="flipIT();"  />	
	<img id="signatureimage2" style="display: none" />	

  
	<center>Enter Comments</center>
	
	<center><textarea style=" font-size: 20px; border: 1px solid #000000; height: 20%; width: 95%; white-space:wrap;" id="Comments"		name="Comments" rows="10" 	onkeyup="var custid = document.getElementById('customer_templates').value;		saveReport (custid, this.id, escape(this.value));"></textarea>
	</center>
	
<br></br>


<!-- Number of Rows Computed in the begin.js   -->

	<div id="readOnlyTA">
		<table  border="0" width="95%" align="center">
		<tr>
			<td >
			<textarea id="equipDisplayRows" rows="10" style="width:100%; height:100%;" readonly="readonly" name="parseEquipName" ></textarea> 
			</td>
			<td >
			<textarea  id="parseEquipTestNames"  rows="10" style="width:100%; height:100%;" readonly="readonly" name="parseEquipTestNames"></textarea>
			</td>
			<td >
			<textarea id="parseRange" rows="10" style="width:100%;  height:100%;" readonly="readonly" name="parseRange"></textarea>
			 </td>
			 <td >
			<textarea  id="equipDataCollection" rows="10" style="width:100%;  height:100%;" readonly="readonly" name="equipDataCollection"></textarea>
			</td>
			</tr>
			</table>
	</div>

<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('comments'); show('actions');" ></td>
		<td>
		<center></center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="hide('comments'); show('SaveIT');" ></td>
	</tr>
</table>
</div>

<div id = "CameraSection" style ="display:none">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('CameraSection'); show('equip');" ></td>
		<td>
		<center><h2>Photos</h2></center>
		</td>
		
		<td colspan="1" align="right"><img src="img/Rarrow.png"	onClick="hide('CameraSection'); show('actions');"
		</td>
	</tr>
</table>

<center>
<img onclick="processPic1();"	style="width: 100px; height: 100px" id="img1" src="img/photo.png" /> 
<img onclick="processPic2();"   style="width: 100px; height: 100px" id="img2" src="img/photo.png" /></br>
<img onclick="processPic3();"   style="width: 100px; height: 100px" id="img3" src="img/photo.png" />
<img onclick="processPic4();"   style="width: 100px; height: 100px" id="img4" src="img/photo.png" /></br>
<img onclick="processPic5();"   style="width: 100px; height: 100px" id="img5" src="img/photo.png" />
<img onclick="processPic6();"   style="width: 100px; height: 100px" id="img6" src="img/photo.png" />
</center>


</p>
<hr>
</p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('CameraSection'); show('equip');" ></td>
		<td>
		<center>&nbsp;

		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="hide('CameraSection'); show('actions');" ></td>
	</tr>
</table>


</div>


<div id="actions" style="display: none; vertical-align:middle;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('actions'); show('CameraSection');" "></td>
		<td>
		<center>
		<h3>Select Actions Taken</h3>
		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="var storage = localStorage.setItem('sigJSON', ''); show('comments'); hide('actions'); //checkConnection();"
			></td>
			
	</tr>
</table>

		

		<table cellpadding="10" >
		
		
		<tr>
		<td>
		
		
		
		<input type="checkbox" id="ActionsList1" 	name="ActionsList"  value="Customer Signed this report"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;">
				</td>
				<td>
				<label for="ActionsList1" onClick="document.forms[0].ActionsList1.checked=(! document.forms[0].ActionsList1.checked);">Customer Signed this report</label>
            
	
		
	</td></tr>
		
		
		
		<tr>
		<td>
		
		
		
		<input type="checkbox" id="ActionsList2" 	name="ActionsList"  value="I effectively managed the system to minimize utility bills"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;">
				</td>
				<td>
				<label for="ActionsList2" onClick="document.forms[0].ActionsList2.checked=(! document.forms[0].ActionsList2.checked);">I effectively managed the system to minimize utility bills</label>
            
	
		
	</td></tr>
	<td>	
		
		
		<input type="checkbox"	name="ActionsList" id="ActionsList3" 
value="I read and recorded the make-up water meter reading"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;">
	</td>
	<td>
	<label for="ActionsList3" onClick="document.forms[0].ActionsList3.checked=(! document.forms[0].ActionsList3.checked);">I read and recorded the make-up water meter reading</label>
            
		
	</td></tr>
		
		<tr><td>
		
		
					<input type="checkbox"	name="ActionsList" id="ActionsList4" 
			value="I batched the chemicals"

					onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
					var c_value = &quot;&quot;;
					var i_value =&quot;&quot;; 

					for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
			 
					saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
							id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
			<td>
			<label for="ActionsList4" onClick="document.forms[0].ActionsList4.checked=(! document.forms[0].ActionsList4.checked);">I batched the chemicals</label>
					
					
			</td></tr>		
		
		<tr><td>
	
					<input type="checkbox"	name="ActionsList" id="ActionsList5"
			value="I checked the chemical feed equipment"

					onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
					var c_value = &quot;&quot;;
					var i_value =&quot;&quot;; 

					for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
			 
					saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
							id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
			<td>
			<label for="ActionsList5" onClick="document.forms[0].ActionsList5.checked=(! document.forms[0].ActionsList5.checked);">I checked the chemical feed equipment</label>
					
					
					</td></tr>
					
					<tr><td>
		<label>
		<input type="checkbox"	name="ActionsList"  id="ActionsList6"
value="I changed the batch formula (see comments)"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
				<td>
				<label for="ActionsList6" onClick="document.forms[0].ActionsList6.checked=(! document.forms[0].ActionsList6.checked);" >I changed the batch formula (see comments)</label>
          
	
	</td></tr>		
		
		</tr><td>
		
		<input type="checkbox"	name="ActionsList" id="ActionsList7"
value="I cleaned the conductivity probe"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td>
<label for="ActionsList7" onClick="document.forms[0].ActionsList7.checked=(! document.forms[0].ActionsList7.checked);">I cleaned the conductivity probe</label>
            
		
			</tr></td>
		<tr><td>	
			
		
		<input type="checkbox"	name="ActionsList" id="ActionsList8"
value="I checked the bleed solenoid"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td>
<label for="ActionsList8" onClick="document.forms[0].ActionsList8.checked=(! document.forms[0].ActionsList8.checked);">I checked the bleed solenoid</label>
       
		
		</td></tr>
		
		<tr><td>	
		
		<input type="checkbox"	name="ActionsList" id="ActionsList9"
value="I inspected the cooling tower sump"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td>
<label for="ActionsList9"  onClick="document.forms[0].ActionsList9.checked=(! document.forms[0].ActionsList9.checked);">I inspected the cooling tower sump</label>
            
	
		</td></tr>
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList10"
value="I inspected the distribution pans"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td>
<label for="ActionsList10" onClick="document.forms[0].ActionsList10.checked=(! document.forms[0].ActionsList10.checked);">I inspected the distribution pans</label>
        
		
		</td></tr>
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList_11" value="I took a sample to be analyzed by our Lab (see comments)"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td onClick="document.forms[0].ActionsList_11.checked=(! document.forms[0].ActionsList_11.checked);">
<label>I took a sample to be analyzed by our Lab (see comments)</label>
           
		
</td></tr>		
		
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList_12" value="I removed Chardon shipping containers"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);" id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
			<td onClick="document.forms[0].ActionsList_12.checked=(! document.forms[0].ActionsList_12.checked);">
			<label>I removed Chardon shipping containers</label>
			</td>
		</tr>		
		
		
	
			
		<tr><td>		

		<input type="checkbox"	name="ActionsList" id="ActionsList13" value="I changed the filter bag"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td onClick="document.forms[0].ActionsList13.checked=(! document.forms[0].ActionsList13.checked);">
<label>I changed the filter bag</label>
            
		
		</td></tr>
				
		<tr><td>		
	
		<input type="checkbox"	name="ActionsList" id="ActionsList14"
value="I added treatment to the closed loop (see comments)"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td onClick="document.forms[0].ActionsList14.checked=(! document.forms[0].ActionsList14.checked);">
<label>I added treatment to the closed loop (see comments)</label>
            
		
	</td></tr>	
			
							<tr><td>
						
							<input type="checkbox"	name="ActionsList" id="ActionsList15"
					value="I ordered more treatment or reagents"

							onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
							var c_value = &quot;&quot;;
							var i_value =&quot;&quot;; 

							for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
					 
							saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
									id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
					<td onClick="document.forms[0].ActionsList15.checked=(! document.forms[0].ActionsList15.checked);">
					<label>I ordered more treatment or reagents</label>
							
							
						</td></tr>	
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList16"
		value="I provided instructions to hands on personnel"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
		<td onClick="document.forms[0].ActionsList16.checked=(! document.forms[0].ActionsList16.checked);"><label>I provided instructions to hands on personnel</label>
         
		
		</td></tr>	
		
		<tr><td>
		
		<input type="checkbox"	name="ActionsList"  id="ActionsList17"
		value="Increase boiler blowdown or scaling or carry over may occur"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
        <td onClick="document.forms[0].ActionsList17.checked=(! document.forms[0].ActionsList17.checked);">
		<label>Increase boiler blowdown or scaling or carry over may occur	</label>
        
	
		</td></tr>
		
		<tr><td>		

		<input type="checkbox"	name="ActionsList"  id="ActionsList18"
		value="Decrease boiler blowdown to decrease utility bills"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
		<td onClick="document.forms[0].ActionsList18.checked=(! document.forms[0].ActionsList18.checked);"><label>Decrease boiler blowdown to decrease utility bills</label>
            

		</td></tr>
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList19"
		value="Closed loop is losing water; please find and correct losses in order to prevent corrosion"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
			<td onClick="document.forms[0].ActionsList19.checked=(! document.forms[0].ActionsList19.checked);">
			<label>Closed loop is losing water; please find and correct losses in order to prevent corrosion</label>
       
	
		</td></tr>
		
		<tr><td>
		
		<input type="checkbox"	name="ActionsList" id="ActionsList20"
		value="Tower sump needs cleaned to prevent corrosion and biological problems"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
		<td onClick="document.forms[0].ActionsList20.checked=(! document.forms[0].ActionsList20.checked);"><label>Tower sump needs cleaned to prevent corrosion and biological problems</label>
         

		
		</td></tr>
		
		<tr><td>
	
		<input type="checkbox"	name="ActionsList" id="ActionsList21" 
		value="Bleed line valve was closed; please keep it it open or scaling will occur"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 21px;"></td>
<td onClick="document.forms[0].ActionsList21.checked=(! document.forms[0].ActionsList21.checked);"><label>Bleed line valve was closed; please keep it it open or scaling will occur</label>
          
		
		</td></tr>
		
		<tr><td>
		
		<input type="checkbox"	name="ActionsList"  id="ActionsList22" 
		value="Tower make-up float needs to be fixed or adjusted"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
	<td onClick="document.forms[0].ActionsList22.checked=(! document.forms[0].ActionsList22.checked);">
	<label>Tower make-up float needs to be fixed or adjusted</label>
           
		
		</td></tr>
		
		<tr><td>		
		
		<input type="checkbox"	name="ActionsList" id="ActionsList23" 
		value="Need to add a filter to the closed loop to prevent corrosion from iron and debris in system"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
		<td onClick="document.forms[0].ActionsList23.checked=(! document.forms[0].ActionsList23.checked);"><label>Need to add a filter to the closed loop to prevent corrosion from iron and debris in system</label>
            
	
		</td></tr>
		
		<tr><td>
		
		<input type="checkbox"	name="ActionsList" id="ActionsList24" 
		value="Tower distribution pans need covers to eliminate extreme algae problems"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
<td onClick="document.forms[0].ActionsList24.checked=(! document.forms[0].ActionsList24.checked);"><label>Tower distribution pans need covers to eliminate extreme algae problems</label>
          
	
		</td></tr>
		
		<tr><td>
		<label>
		<input type="checkbox"	name="ActionsList" id="ActionsList25" 
		value="Need lay up treatment to help minimize corrosion during off season"

		onclick="var custid = document.getElementById(&quot;customer_templates&quot;).value;
		var c_value = &quot;&quot;;
		var i_value =&quot;&quot;; 

		for (var i=0; i &lt; document.forms[0].ActionsList.length; i++) {   if (document.forms[0].ActionsList[i].checked)      		{c_value = c_value + document.forms[0].ActionsList[i].value + &quot;;&quot;;      i_value = i_value + i +&quot;;			&quot;}}
 
		saveReport (custid, &quot;ActionsList&quot;, c_value); saveReport (custid, &quot;ActionNum&quot;, i_value);"
				id="ActionsList" style="margin-top: 10; padding: 20px;"></td>
	<td onClick="document.forms[0].ActionsList25.checked=(! document.forms[0].ActionsList25.checked);"><label>Need lay up treatment to help minimize corrosion during off season</label>
   
		
		</td></td>
		
	</table>		
			



<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('actions'); show('CameraSection');" "></td>
		<td>
		<center></center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="var storage = localStorage.setItem('sigJSON', ''); hide('actions'); show('comments');"></td>
	</tr>
</table>


</div>



<div id="signature" style="display: none">



<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="center"></td>
		<td>
		
						
			   
				<img src="img/getSig.png"  style="display: none1" onClick="resetCanvas();show('simple'); hide('signatureimage');/>	
		
				
				
			
					
			
			
			
			
			<td  colspan="1" align="right"></td>
	</tr>
</table>
<img src="img/Larrow.png" onClick="hide(''); show('actions');" ">
<img src="img/Rarrow.png" onClick=" show('SaveIT'); hide('actions'); checkConnection();" >



<p>


<p><input type="hidden" name="output" class="output"> 
<input type="hidden" name="daSigData" class="output">






</div>




<!-- **** Actions PAGE   Not in USE! **** -->

<div data-role="page" id="actionsNew"  >

  <div data-role="header">
    <h1>Select Actions</h1>
    <a href='javascript:refresh();' data-icon="refresh" id="refresh" data-theme="c" class="ui-btn-left" data-iconpos="notext"></a> 
  </div>
  
  <div data-role="content">
   
	<input type="checkbox" name="ActionsList"  value="I effectively managed the system to minimize utility bills" id="ActionsList" class="custom" data-mini="true" />
	<label for="ActionsList">I effectively managed the system to minimize utility bills</label>
   
	<input type="checkbox" name="ActionsList"  value="I read and recorded the make-up water meter reading" id="ActionsList1" class="custom" data-mini="true" />
	<label for="ActionsList1">I read and recorded the make-up water meter reading</label>
	
	<input type="checkbox" name="ActionsList"  value="I batched the chemicals" id="ActionsList2" class="custom" data-mini="true" />
	<label for="ActionsList2">I batched the chemicals</label>
	
	<input type="checkbox" name="ActionsList"  value="I checked the chemical feed equipment" id="ActionsList3" class="custom" data-mini="true" />
	<label for="ActionsList3">I checked the chemical feed equipment</label>
	
	<input type="checkbox" name="ActionsList"  value="I changed the batch formula (see comments)" id="ActionsList4" class="custom" data-mini="true" />
	<label for="ActionsList4">I changed the batch formula (see comments)</label>
	
	<input type="checkbox" name="ActionsList"  value="I cleaned the conductivity probe" id="ActionsList5" class="custom" data-mini="true" />
	<label for="ActionsList5">I cleaned the conductivity probe</label>
	
	<input type="checkbox" name="ActionsList"  value="I checked the bleed solenoid" id="ActionsList6" class="custom" data-mini="true" />
	<label for="ActionsList6">I checked the bleed solenoid</label>
	
	<input type="checkbox" name="ActionsList"  value="I inspected the cooling tower sump" id="ActionsList7" class="custom" data-mini="true" />
	<label for="ActionsList7">I inspected the cooling tower sump</label>
	
	<input type="checkbox" name="ActionsList"  value="I inspected the distribution pans" id="ActionsList8" class="custom" data-mini="true" />
	<label for="ActionsList8">I inspected the distribution pans</label>
	
	<input type="checkbox" name="ActionsList"  value="I took a sample to be analyzed by our Lab (see comments)" id="ActionsList9" class="custom" data-mini="true" />
	<label for="ActionsList9">I took a sample to be analyzed by our Lab (see comments)</label>
	
	<input type="checkbox" name="ActionsList"  value="I removed Chardon shipping containers" id="ActionsList10" class="custom" data-mini="true" />
	<label for="ActionsList10">I removed Chardon shipping containers</label>
	
	
  </div>
  
  <div data-role="footer" data-position="fixed" data-id="toolbar">
    <div data-role="navbar">
      <ul>
	  	<li><a href="#equipment" onClick=""  data-icon="arrow-l" data-transition="fade">Back</a> </li>
        <li><a href="#ChooseCustomer" data-icon="home" data-transition="fade">Home</a></li>
		<li><a href="#signature" onClick=""  data-icon="check" data-transition="fade">Sign</a> </li>
		<li><a href="#comments" onClick=""  data-icon="arrow-r" data-transition="fade">Next</a> </li>
      </ul>
    </div>
  </div>
  
</div>








<div id="SaveIT" style="display: none">


<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td colspan="1" align="left"><img src="img/Larrow.png"
			onClick="hide('SaveIT'); show('comments');" ></td>
		<td>
		<center>
		<h3>Complete iReport</h3>
		</center>
		</td>
		<td colspan="1" align="right"><img src="img/Rarrow.png"
			onClick="alert('Save Draft or Send it');"
			style="display:none"></td>
	</tr>
</table>

<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td colspan="3"><img
			style="width: 25px; height: 30px; float: left; padding-top: .1cm; padding-right: .5cm; padding-left: .5cm;"
			id="logo" src="img/logo.png" onClick="updateCounts();" />
		
		</td>
	<tr>

		<font size="2" face="Verdana">
		<td>&nbsp&nbsp;<text id='onlineStatus'></td>
		<td>&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp</td>
		<td alight='right'>Tech: <text id='TechName4'></text>&nbsp;&nbsp
		</font>
		</td>
	</tr>
</table>


<hr>
<center><a id="SaveSendID" href="#"
	onclick="var unid = document.getElementById('DaUnid').value;  completeReport(unid, 'Status', 'Completed'); ">
	<img src="img/savesendtrans.png"></img></a> <a href="#"	onclick="alert('Draft Saved');"><img src="img/draft.png"></img></a>
	<a href="index.html" onclick="window.location.reload();"><img src="img/home.png"></img></a>
</p>
<hr>


 <!--
<a href="#"
	onclick="var custid = document.getElementById('customer_templates').value;
    saveReport(custid, 'Status', 'Completed'); SetEndTime(custid); login(); MultisyncData();"><img
	src="img/savesendtrans.png"></img>Multi Sync</a>
-->

</center>
</div>


<div id="Hidden Fields" style="display: none">


<table border="0" cellspacing="0" cellpadding="0">

	<tr valign="top">
		<td width="96"><input type="button" onclick="hide("
			equip");
show("shrinkingList");" value="equipL" id="equipL"
			style="display: none" name="equipL"></td>
		<td width="96"></td>
		<td width="125"><input type="button" onclick="show("
			comments");
hide("equip");" value="equipR" id="equipR"
			style="display: none" name="equipR"></td>
	</tr>
</table>

<input id="row" name="row" type="hidden" value="0"> direction<input
	id="direction" name="direction" value=""> <input id="r"
	name="r" type="hidden" value=""> <input id="i" name="i"
	type="hidden" value=""> <input id="o" name="o" type="hidden"
	value=""> <text id='dspCustHist'></text> <text id='dspCustID'></text>

<text id='BillAddress'></text> </font>
</td>
<td width="125"></td>
</tr>

<tr valign="top">
	<td width="96"><font size="2" face="Verdana"><text
		id='dspPhone'></text></font></td>
	<td width="221" colspan="2"><font size="2" face="Verdana"><text
		id='CSZ'> </text></font></td>
	<td width="125"></td>
</tr>






custid<input id="custid" value=""></font>
</td>
<td width="82"><font face="Arial"> BillName<input
	id="BillName" name="BillName" value=""></font></td>
<td width="82"><font face="Arial"> Timestamp<input
	id="timestamp"></input></br>
	
	<input id="DaUnid"></input>
	
StartTime<input id="StartTime"></input></br>
EndTime<input id="EndTime"></input></br>

notify<input id="notify"></input> shipphone <input id="ShipPhone"></input>
breakpoint<input id="breakpoints" name="breakpoints" value="" rows=5
	cols=10 style="display: none1"></font></i> <font size="2" face="Arial">
<textarea id="EquipmentArray" name="EquipmentArray" rows=5 cols=15></textarea>
</font><font size="2" face="Arial"> ID: </font><font size="2" face="Arial">
<input name="id" value="" id="id"></font><font size="2" face="Arial">
key: </font><font size="2" face="Arial"> <input name="key" value=""
	id="key"></font><font size="2" face="Arial"> </font>







<table border="1">

	<tr valign="top">
		<td width="82"><font face="Arial"> <input id="Contact"
			name="Contact" value=""></font></td>
		<td width="82"><font face="Arial"> </font></td>
		<td width="82"><font face="Arial"> <input id="BillAddr2"
			name="BillAddr2" value=""></font></td>
		<td width="82"><font face="Arial"> <input id="BillCity"
			name="BillCity" value=""></font></td>
		<td width="82"><font face="Arial"> <input id="BILLState"
			name="BILLState" value=""></font></td>
		<td width="82"><font face="Arial"> <input id="BillZip"
			name="BillZip" value=""></font></td>
		<td width="82"><font face="Arial"></font></td>
	</tr>
</table>

<table border="1">
	<tr valign="top">
		<td width="370"><font face="Arial">Access Given</font></td>
		<td width="370"><font face="Arial">Corp Name</font></td>
	</tr>
	<tr valign="top">
		<td width="370"><font face="Arial"> <textarea
			id="accessGivenTo" name="accessGivenTo" rows="2" cols="20"></textarea>
		</font></td>
		<td width="370"><font face="Arial"> <input
			id="CorporateName" name="CorporateName" value=""></font></td>
	</tr>
</table>
</div>



<div style="display: none">


<input type="button"	onclick="var d = new Date(); var curr_date = d.getDate();var curr_month = d.getMonth();curr_month++;var curr_year = d.getFullYear();daDate =   curr_month  + '/' + curr_date  + '/' + curr_year;document.forms[0].ReportDate.value = daDate;"			value="Today" id="today" name="today" >



<a href="getBV.html" class="btn large">Get
BV Data</a> <a href="JSON.html" class="btn large">JSON</a> <a
	href="pgTest.html" class="btn large">PG Test</a> <a href="#"
	class="btn large" onclick="watchAccel();">Watch Accelerometer</a> <a
	href="NotesSignature.html" class="btn large">Signature Capture</a> <a
	href="addData.html" class="btn large">Send eReport to Server</a> <a
	href="takepic.html" class="btn large">Add Photo</a> <a
	href="webSQL.html" class="btn large" onclick="">eReport 5 </a> <a
	href="#" class="btn large" onclick="initWEBDB();">Initialize Local
DB</a> <a href="#" class="btn large" onclick="getLocation();">Get
Location</a> <a href="tel://411" class="btn large">Call 411</a> <a href="#"
	class="btn large" onclick="beep();">Beep</a> <a href="#"
	class="btn large" onclick="vibrate();">Vibrate</a> 
	
	
	<textarea	name="parseEquipType" rows=50 cols=30></textarea> </font></i>
</td>
<td width="230"><font size="2" face="Arial">Parse Equipname</font><i><font
	size="2" face="Arial"> 
	
	 <textarea	id="LastMonthEquipDataCollection" rows=50 cols=30></textarea> </font></i>
<p><i><font size="2" face="Arial"> 
<textarea id="LastMonthEquipDataCollection2" rows=50 cols=30></textarea> </font></i>
<p><i><font size="2" face="Arial">
<textarea id="LastMonthEquipDataCollection3" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection4" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection5" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection6" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection7" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection8" rows=50 cols=30></textarea>
<textarea id="LastMonthEquipDataCollection9" rows=50 cols=30></textarea>

//4-26-12 this is the field that is used for holding history	
<textarea id="HistoryEquipDataCollection" rows=50 cols=30></textarea>



<input	id="dspCustID"></input> <input id="dspCustHist"></input> ActionsList
<inputid="ActionsList"></input> ActionIndex<input id="ActionIndex"></input>




 cycles <input
	name="cycles"></input> BillAddress<input name="BillAddress"></input>
Equipment History <input id="EquipListHist" name="EquipListHist"
	type="hidden1" value=""> <input name="row" type="hidden"
	value="0"> <input name="r" type="hidden" value=""> <input
	name="i" type="hidden" value=""> <input name="o" type="hidden"
	value="">
</form>
</body>
</html>